package net.dengzixu.java.homework.period19;

/**
 * @author Deng Zixu <admin@dengzixu.com>
 */
public class Food extends Goods {
    private String expDate;

    public Food(String name, String origin, String price, String expDate) {
        super(name, origin, price);
        this.expDate = expDate;
    }

    @Override
    public void print() {
        System.out.printf("[%s] 产地: %s, 价格: %s, 过期时间: %s", super.getName(), super.getOrigin(), super.getPrice(),
                this.expDate);
    }

    public String getExpDate() {
        return expDate;
    }

    public void setExpDate(String expDate) {
        this.expDate = expDate;
    }
}
